<template>
  <div>
    <van-nav-bar
        @click-left="onClickLeft"
        @click-right="onClickRight"
      left-arrow
    >
        <slot slot="title" name="title"></slot>
        <slot slot="left"  name="left"></slot>
         <slot slot="right"  name="right"></slot>
    </van-nav-bar>
  </div>
</template>

<script>
import { NavBar} from 'vant';
export default {
    name: 'Header',
     components: {
        [NavBar.name]: NavBar,
     },
     methods:{
         onClickLeft(){
              this.$router.go(-1);
         },
          onClickRight(){},
     }
}
</script>

<style>

</style>